package com.ido.admin.api.service.impl;

import com.ido.admin.api.service.TbCategoryService;
import com.ido.admin.api.dao.TbCategoryDao;
import com.ido.admin.api.entity.TbCategory;
import org.hswebframework.web.id.IDGenerator;
import org.hswebframework.web.service.GenericEntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TbCategoryServiceImpl
        extends GenericEntityService<TbCategory, String>
        implements TbCategoryService {
    private TbCategoryDao categoryDao; //
    /**
     * 构造器注入
     * @param categoryDao
     */
    @Autowired
    public TbCategoryServiceImpl(TbCategoryDao categoryDao){
         this.categoryDao = categoryDao;
    }

    @Override
    protected IDGenerator<String> getIDGenerator() {
        return IDGenerator.MD5;
    }

    @Override
    public TbCategoryDao getDao() {
        return categoryDao;
    }
}
